<template>
  <j-select-biz-component :width="1000" v-bind="configs" :queryParams='queryParams' v-on="$listeners"/>
</template>

<script>
  import JSelectBizComponent from './JSelectBizComponent'

  export default {
    name: 'JSelectProduct',
    components: { JSelectBizComponent },
    props: {
      value:{
        type:String,
        default:''
      },
      queryParams:{
        type:Object,
        default: ()=>{}
      }

    },
    data() {
      return {
        settings: {
          name: '产品层级',
          displayKey: 'typeCode',
          returnKeys: ['id', 'typeCode'],
          listUrl: '/goodsclassify/cnGoodsClassify/getProductTypeTree',
          queryParamCode: 'typeName',
          queryParamText: '产品层级名称',
          ellipsisLength:-1,
          columns: [
            { title: '产品层级名称', field: 'typeName', align: 'center', width: '50%', widthRight: '70%' },
            { title: '产品层级编号', field: 'typeCode', align: 'center', width: '50%' },
          ]
        }
      }
    },
    computed: {
      configs() {
        return Object.assign({ value: this.value }, this.settings, this.$attrs)
      }
    }
  }
</script>

<style lang="less" scoped></style>